
module.exports = require('angular')
    .module('components.banner.service', [])
    .factory('bannerservice', function ($q) {
        return {
            imgList: null,
            indexRender: null,
            indexCur: 1,
            getIndexBanners: function () {
                var ret = [
                    require('./images/1.jpg'),
                    require('./images/2.jpg'),
                    require('./images/3.jpg'),
                ]
                var defer = $q.defer()
                var this_ = this
                setTimeout(function () {
                    this_.imgList = ret
                    defer.resolve(ret)
                }, 500)
                return defer.promise;
            }
        }
    })